﻿using System;
using CurriculumData;

namespace CurriculumSite
{
    public partial class ProfileAttachment : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Controller controller = new Controller();
            Candidate candidate = controller.GetCandidate(Convert.ToInt32(Request["CandidateId"]));
            if (candidate.AttachmentType == null || candidate.Attachment == null)
                return;
            Response.ContentType = candidate.AttachmentType;
            Response.BinaryWrite(candidate.Attachment);
        }
    }
}
